//    Copyright (C) Kherty.  All rights reserved.
using System;

namespace OpenLS.Chart.UI
{
    class ChartShapeTypeToMeshFactoryConverter
    {
        internal static MeshGeometryFactory Convert(ChartShape type, BarDirection direction)
        {
            switch(type)
            {
                case ChartShape.Box:
                    return new CubeGeometryFactory(direction);
                    case ChartShape.Cone:
                    return new ConeGeometryFactory(direction);
                    case ChartShape.ConeToMax:
                    return new ConeToMaxGeometryFactory(direction);
                    case ChartShape.Cylinder:
                    return new CylinderGeometryFactory(direction);
                    case ChartShape.Pyramid:
                    return new PyramidGeometryFactory(direction);
                    case ChartShape.PyramidToMax:
                    return new PyramidToMaxGeometryFactory(direction);
                    default: throw new NotSupportedException(type.ToString());
            }
        }
    }
}
